<template>
  <div>
    <pulldown header="基本信息">
      <div slot="content">
        <a-descriptions bordered :column="3">
          <a-descriptions-item v-for="(item,index) of  forList1" :key="index" :label="item.name" :span="item.span">

          </a-descriptions-item>
        </a-descriptions>
      </div>
    </pulldown>
    <pulldown header="帮扶情况">
      <div slot="content" class="bfqk">
        <a-descriptions bordered :column="2">
          <a-descriptions-item v-for="(item,index) of  forList" :key="index" :label="item.name" :span="item.span">
            <a-descriptions bordered :column="1">
              <a-descriptions-item v-for="(keyObj,i) of  item.children" :key="i" :label="keyObj.name" :span="1">
                <span style="margin-left: 20px">{{ estimateCare[keyObj.key] }}</span>
<!--                <span style="margin-left: 20px">我没病，我很厉害，我很帅</span>-->
              </a-descriptions-item>
            </a-descriptions>
          </a-descriptions-item>
        </a-descriptions>
      </div>
    </pulldown>


    <!--    {{$filterDictTextByCache('process_approval_type', 1)}}-->
  </div>
</template>

<script>
import pulldown from '../../../modules/pulldown'
import {basicDetail, Families} from "@api/sjsk/archives";
import {estimateDetails} from "@api/sjsk/estimate/list";
export default {
  name: "basic",
  components:{ pulldown },
  mounted() {
  },
  data(){
    return   {
      resultData:{},
      innse:true,
      user:{},
      forList1:[
        {name:'姓名',key:'durgRehabilitatioName',val:'2022.07.14'},
        {name:'性别',key:'firstDrugTime',val:'张三'},
        {name:'身份证号',key:'previousDurgNum',val:'女'},
        {name:'户籍地',key:'isReAbsorption',val:'2022.07.14'},
        {name:'居住地',key:'nation',val:'61KG'},
        {name:'当前管控状态',key:'sex',val:'171cm'},
        {name:'末次查处吸食毒品种类',key:'reasonsAdmission',val:'海南海口'},
        {name:'社会面风险等级',key:'estimatedTime',val:'未婚'},
        {name:'是否定制“一人一策”',key:'decisionOrgan',val:'O型'},
        {name:'就业类型',key:'admissionTime',val:'汉族'},
        {name:'本人月经济收入(元)',key:'enterStartTime',val:'共青团员'},
        {name:'家庭月经济收入(元)',key:'enterEndTime',val:'健康'},
      ],
      forList:[
        {name:'就业安置',key:'jy',children:[
        {father:'jy',name:'是否享需要有就业安置',key:'isPlacement'},
        {father:'jy',name:'接收就业培训次数',key:'acceptTrainNum'},
        {father:'jy',name:'介绍就业次数',key:'introduceNum'},
        {father:'jy',name:'就业存在困难',key:'employmentDifficult'},
        ]},
        {name:'落实医保',key:'ls',children:[
        {father:'ls',name:'是否享受低保',key:'isLow'},
        {father:'ls',name:'无法享受低保原因',key:'noLowReason'},
        {father:'ls',name:'是否享受医保',key:'isMedical'},
        {father:'ls',name:'无法享受医保原因',key:'noMedicalReason'},
        ]},
        {name:'解决子女上学问题',key:'sx',children:[
        {father:'sx',name:'是否有未成年子女',key:'isChildren'},
        {father:'sx',name:'是否解决上学困难问题',key:'isSchoolDifficult'},
        {father:'sx',name:'无法解决上学原因',key:'noSchoolReason'},
        ]},
        {name:'心理辅导',key:'xl',children:[
        {father:'xl',name:'是否需要并接受心理辅导',key:'isGuidance'},
        {father:'xl',name:'接受心理辅导次数',key:'acceptGuidanceNum'},
        {father:'xl',name:'未提供心理辅导原因',key:'noGuidanceReason'},
        ]},
        {name:'住房问题',key:'zf',children:[
        {father:'zf',name:'是否需要并解决住房问题',key:'isSolveHousing'},
        {father:'zf',name:'解决方式',key:'solveWayHousing'},
        {father:'zf',name:'未解决住房问题原因',key:'noHousingReason'},
        ]},
        {name:'婚姻问题',key:'hy',children:[
        {father:'hy',name:'婚姻状况',key:'a'},
        {father:'hy',name:'是否存在问题',key:'a'},
        {father:'hy',name:'是否解决或未解决原因',key:'a'},
        ]},
        {name:'法律援助',key:'fl',children:[
        {father:'fl',name:'是否存在法律纠纷',key:'isDispute'},
        {father:'fl',name:'是否解决',key:'solveWayDispute'},
        {father:'fl',name:'未解决原因',key:'nreasonDispute'},
        ]},
        {name:'慰问帮扶',key:'ww',children:[
        {father:'ww',name:'是否接受过慰问帮扶',key:'isHelp'},
        {father:'ww',name:'接受次数',key:'acceptNumHelp'},
        {father:'ww',name:'存在困难',key:'difficultHelp'},
        ]},
        {name:'赡养父母',key:'sy',children:[
        {father:'sy',name:'是否存在赡养父母困难',key:'isParentDifficult'},
        {father:'sy',name:'赡养父母困难原因',key:'parentReason'},
        ]},
        {name:'其他问题',key:'qt',children:[
        {father:'qt',name:'问题内容',key:'questionOther'},
        {father:'qt',name:'未解决原因',key:'reasonOther'},
        ]},
      ],
      forListChildren:[],

      pageData:[],
      estimateCare:null
    }
  },
  methods:{
    refreshTable(){
      console.log('asdasd')
      estimateDetails('1').then(res => {
        console.log(res)
        const {
          success,
          result
        } = res
        if (success) {
          this.estimateCare = result.estimateCare
          console.log(this.estimateCare)
          // this.estimateKeywordList = result.estimateKeywordList
          // this.estimateMainQuestion = result.estimateMainQuestion
        }
      })
    },
  }
}
</script>

<style scoped>
/deep/.bfqk td{
  padding: 0 !important;
}
</style>